package com.hctforgreen.greenservice.ctr;

import android.content.Context;

import com.hctforgreen.greenservice.utils.HctBackTestJsonRawUtil;
/**
 * 本地模拟数据的控制器
 * @author Tallen Zhai
 *
 */
public class HctBackTestJsonController {

	private Context mContext = null;

	private static boolean B_DEBUG = false;
	public static boolean isB_DEBUG() {
		return B_DEBUG;
	}
	public HctBackTestJsonController(Context context) {
		mContext = context;
	}
	/**
	 * 1、所有系列信息
	 * 
	 * @return
	 */
	public String getAllSeries() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();
		
		if(B_DEBUG){
			String sLocation = rawUtil.getAllSeries(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
	 * 2、所有机型信息
	 * 
	 * @return
	 */
	public String getAllMachines() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		if(B_DEBUG){
			String sLocation = rawUtil.getAllMachines(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
	 * 3、所有资料类别信息
	 * 
	 * 
	 * @return
	 */
	public String getAllBooktypes() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getAllBooktypes(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
	 * XXX 4、根据系列ID获取资料
	 * 由getAllBooks替代
	 * @return
	 */
	@Deprecated
	public String getBooksBySeriesId() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getBooksBySeriesId(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
	 * 4、获取所有资料
	 * @return
	 */
	public String getAllBooks() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getAllBooks(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
	 * 6、用户登录
	 * 
	 * @return
	 */
	public String appLogin() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.appLogin(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
     * 7、获取开机密码
	 * 
	 * @return
	 */
	public String getBootPwd() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getBootPwd(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
	 * FIXME 信息反馈
	 * @return
	 */
	@Deprecated
	public String addFee() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.defaultResult(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * FIXME
	 * @return
	 */
	@Deprecated
	public String getVersionCode() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getVersionCode(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 8、提交文本反馈
	 * @return
	 */
	public String submitFeedBack() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.defaultResult(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 9、提交电话反馈
	 * @return
	 */
	public String submitPhoneFeedBack() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.defaultResult(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	
	/**
	 * 10、根据用户Id获取反馈信息
	 * @return
	 */
	public String getFeedBackJsonByPersonId() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getFeedBackJsonByPersonId(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * FIXME 11、根据反馈Id和图片名称获取图片
	 * @return
	 */
	public String getFeedbackPicByName() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getFeedbackPicByName(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 12、获取最新通知列表
	 * @return
	 */
	public String getRecentMessages() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getRecentMessages(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 13、获取通知列表
	 * @return
	 */
	public String getMessagesFromDate() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getMessagesFromDate(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	
	/**
	 * 14、根据通知Id获取通知详情
	 * @return
	 */
	public String getMessageById() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getMessageById(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 15、提交App反馈
	 * @return
	 */
	public String submitReport() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.defaultResult(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 16、检查App版本
	 * @return
	 */
	public String checkVersion() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.checkVersion(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 获取机型对应资料阅读数
	 * @return
	 */
	public String getBookClick() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getBookClick(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	//==========1.5版本接口================
	/**
	 * 获取Gif图片id及说明文字
	 * @return
	 */
	public String getLoadingInfo() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getLoadingInfo(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	public String getDataVersionCode() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getDataVersionCode(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	/**
	 * 20160608
	 * 390694添加书籍资料调试
	 * @return
	 */
	public String getBookDataVersionCode() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getDataVersionCode(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	
	/**
	 * 调试维修栏目信息
	 * @return
	 */
	public String getAllColumns() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getAllColumns(mContext);
			return sLocation;
		}else{
			return "";
		}
		
	}
	/**
	 * 支持机型
	 * @return
	 */
	public String getContentByInfoType() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getContentByInfoType(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	public String addClickCount() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.defaultResult(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	public String addDownloadCount() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.defaultResult(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
	
	/**
	 * 12、获取最新学习资料列表
	 * @return
	 */
	public String getRecentLearningData() {
		HctBackTestJsonRawUtil rawUtil = new HctBackTestJsonRawUtil();

		
		if(B_DEBUG){
			String sLocation = rawUtil.getRecentMessages(mContext);
			return sLocation;
		}else{
			return "";
		}
	}
}
